<%@include file="/common/CHeader.jsp" %>
<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" isELIgnored="false" %>
<!doctype html>
<html>
<head>
    <title></title>
    <meta charset="UTF-8">
    <%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

</head>
<body>

    <form class="form-inline definewidth m20" style="margin-bottom: 10px;">
        <div class="input-append date form_datetime">
            <input class="form-control" type="text">
            <span class="add-on"><i class="icon-th"></i></span>
            <input type="submit" class="btn btn-primary" value="查询"/>
        </div>

</form>
<table class="table table-bordered table-hover definewidth m10">
    <thead>
    <tr>
        <th>FID</th>
        <th>OPER</th>
        <th>SNDR</th>
        <th>RCVR</th>
        <th>SEQN</th>
        <th>DDTM</th>
        <th>TYPE</th>
        <th>STYP</th>
        <th>OUTTM</th>
        <th>OUTFLAG</th>
        <th>ETLTIM</th>
        <th>ETLFLAG</th>
        <th>ERRTM</th>
        <th>ERRFLAG</th>
    </tr>
    </thead>
    <c:forEach items="${modelAndPage.model}" var="t">
        <tr>
            <td>${t.fid}</td>
            <td>${t.oper}</td>
            <td>${t.sndr}</td>
            <td>${t.rcvr}</td>
            <td>${t.seqn}</td>
            <td>${t.ddtm}</td>
            <td>${t.type}</td>
            <td>${t.styp}</td>
            <td>${t.outtm}</td>
            <td>${t.outflag}</td>
            <td>${t.etltim}</td>
            <td>${t.etlflag}</td>
            <td>${t.errtm}</td>
            <td>${t.errflag}</td>

        </tr>
    </c:forEach>
</table>
<div class="inline pull-right page">
    <c:set var="page" value="${modelAndPage.page}"></c:set>
    ${page.getCount()} 条记录&nbsp; ${page.getCurrent()}/${page.getTotal()} 页&nbsp;
    <c:if test="${page.getCurrent()>1}">
        <a href="?begin=${(page.getCurrent()-2)*page.length}">上一页</a>&nbsp;
    </c:if>
    <c:set var="endPage" value="false"/>
    <c:forEach begin="0" step="1" end="${page.getTotal()-1}" var="everyPage">
        <c:choose>
            <c:when test="${everyPage+1 >5}">
                <c:if test="${endPage=='false'}">
                    <c:set var="endPage" value="true"/>
                </c:if>
            </c:when>
            <%--<c:otherwise>--%>
            <%--<a href="?begin=${everyPage*page.length}">${everyPage+1}</a>--%>
            <%--</c:otherwise>--%>
        </c:choose>
    </c:forEach>

    <c:if test="${page.getCurrent()<page.getTotal()}">
        <a href="?begin=${(page.getCurrent())*page.length}">下一页</a>
    </c:if>
</div>

    <script type="text/javascript">
        $(".form_datetime").datetimepicker({
            format: "YYYY-MM-DD"
        });
    </script>
</body>
</html>
